package org.carl.base.driving.entity;

import com.pugwoo.dbhelper.annotation.Column;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public abstract class BaseEntity {
    /**
     * 创建时间
     */
    @Column(value = "gmt_create", setTimeWhenInsert = true)
    protected Date gmtCreate;

    /**
     * 修改时间
     */
    @Column(value = "gmt_modify", setTimeWhenUpdate = true)
    protected Date gmtModify;

    @Column("version")
    protected Integer version;
    /**
     * 软删除标记，false未删除，true已删除
     */
    @Column(value = "deleted", softDelete = {"0", "1"})
    protected Boolean deleted;

}
